package ch03.shiLi;

import ch03.shiLi.dao.NewsDao;
import ch03.shiLi.service.impl.NewsServiceImpl;

//测试类
public class Test {
    public static void main(String[] args) {
        NewsDao dao = SimpleDaoFactory.getInstance("mysql");
        MySqlDaoFactory factory = new MySqlDaoFactory();//改变具体工厂可创建不同产品
        NewsServiceImpl service = new NewsServiceImpl();
        service.setDao(dao);

    }
}
